1340 DIM IM(6):DIM IM1(6):DIM IM2(6):DIM IM3(6):GET (145,59)-(145,59),IM:GET (145,59)-(145,59),IM1:GET (155,58)-(157,60),IM2:GET (167,57)-(173,61),IM3
1350 DIM IM4(13):IM4(0)=22:IM4(1)=7:IM4(2)=128:IM4(3)=-32760:IM4(4)=2048:IM4(5)=128:IM4(6)=-22008:IM4(7)=-22358:IM4(8)=128:IM4(9)=-32760:IM4(10)=2048:IM4(11)=128:IM4(12)=8
1360 DIM IM5(20):IM5(0)=26:IM5(1)=9:IM5(2)=128:IM5(3)=-32768!:IM5(4)=128:IM5(5)=-32768!:IM5(6)=128:IM5(7)=-32768!:IM5(8)=128:IM5(9)=-32768!:IM5(10)=-21846:IM5(11)=-32598:IM5(12)=128
1380 DIM IM6(44):IM6(0)=34:IM6(1)=17:IM6(2)=2048:IM6(5)=32:IM6(7)=-32768!:IM6(9)=512:IM6(12)=-32760:IM6(14)=8192:IM6(15)=32:IM6(17)=2176:IM6(20)=2:IM6(23)=128:IM6(25)=8192:IM6(28)=8
2190 LOCATE 8,1:PRINT "REPUBLIC X-WING STAR FIGHTER"
2200 LOCATE 10,5:PRINT "TORPEDOES"
2210 LOCATE 12,1:PRINT "HOR. VERT. DIRECTION"
2220 LOCATE 15,1:PRINT "SPEED MACH"
2230 LOCATE 17,1:PRINT "RADAR TARGETS"
2240 LOCATE 18,8:PRINT "KM TO IMPERIAL FIGHTER"
2250 LOCATE 19,8:PRINT "KM TO DARTH VADER"
2260 LOCATE 20,8:PRINT "KM TO DEATH STAR"
2270 LOCATE 22,1:PRINT "TIME REMAINING"
2280 PLAY"T250"
2290 SEC1=VAL(RIGHT$(TIME$,2))
2300 GOSUB 1180
2310 REM * MASTER CONTROL ROUTINE *
2320 GOSUB 1190
2330 PUT (38,21),DS1
2340 LOCATE 10,1:PRINT Z
2350 LOCATE 13,1:PRINT W;" ";-V
2360 LOCATE 15,12:PRINT Q*10
2370 GS=G-S:IF GS<0 THEN GS=0
2380 LOCATE 18,1:PRINT GS
2390 JS=J-S:IF JS<0 THEN JS=0
2400 LOCATE 19,1:PRINT JS
2410 OS=O-S:IF OS<0 THEN OS=0
2420 LOCATE 20,1:PRINT OS
2430 LOCATE 22,16:PRINT A1;":";A2NEW
2440 SOUND 37*Q,1
2450 PUT (38,21),DS1
2460 GOSUB 1180
2470 REM * DISPLAY DEATH STAR *
2480 IF O-S=30000 OR O-S>30000 GOTO 2840
2490 IF O-S<20000 AND DSTAR2=0 THEN DSTAR2=1:DSFLAG=1:DS(0)=DS2(0):DS(1)=DS2(1):DS(2)=DS2(2):DS(3)=DS2(3)
2500 IF O-S<10000 AND DSTAR3=0 THEN DSTAR3=1:DSFLAG=2:DS(0)=DS3(0):DS(1)=DS3(1):DS(2)=DS3(2):DS(3)=DS3(3)
2510 IF O-S<5000 AND DSTAR4=0 THEN DSTAR4=1:DSFLAG=3:DS(0)=DS4(0):DS(1)=DS4(1):DS(2)=DS4(2):DS(3)=DS4(3):DS(4)=DS4(4):DS(5)=DS4(5):DS(6)=DS4(6):DS(7)=DS4(7):DS(8)=DS4(8)
2520 IF FLAG1<>BYPASS THEN FLAG1=FLAG1+1:GOTO 2550
2530 FLAG1=0
2540 M=M+INT(RND*5)-2:N=N+INT(RND*5)-2
2550 M=M-W:N=N-V
2560 IF M<2 THEN M=2+INT(RND*3)
2570 IF M>69 THEN M=69-INT(RND*3)
2580 IF N<2 THEN N=2+INT(RND*3)
2590 IF N>35 THEN N=35-INT(RND*3)
2600 GOSUB 1190
2610 PUT (M,N),DS
2620 IF DSNEW=0 THEN DSNEW=1:GOTO 2680
2630 IF DSFLAG=0 GOTO 2670
2640 IF DSFLAG=1 THEN DSFLAG=0:PUT (MP,NP),DS1:GOTO 2680
2650 IF DSFLAG=2 THEN DSFLAG=0:PUT (MP,NP),DS2:GOTO 2680
2660 IF DSFLAG=3 THEN DSFLAG=0:PUT (MP,NP),DS3:GOTO 2680
2670 PUT(MP,NP),DS
2680 GOSUB 1180
2690 MP=M:NP=N
2700 IF O-S>10000 OR FLAG=1 GOTO 2840
2710 GOSUB 1190
2720 FOR K=1 TO 2
2730 LOCATE 24,1:PRINT "*** DEATH STAR WITHIN TORPEDO RANGE ***";
2740 PLAY "L2 N0"
2750 LOCATE 24,1:PRINT " ";
2760 PLAY "L16 N0"
2770 NEXT K
2780 LOCATE 24,1:PRINT "*** DEATH STAR WITHIN TORPEDO RANGE ***";
2790 PLAY "L1 N0":PLAY "L1 N0"
2800 LOCATE 24,1:PRINT " ";
2810 GOSUB 1180
2820 FLAG=1
2830 REM * DISPLAY IMPERIAL FIGHTER *
2840 GOSUB 1190
2850 IF G-S>26000 THEN GOSUB 1180:GOTO 3910
2860 IF G-S<20000 AND IMPFIGH2=0 THEN IMPFIGH2=1:IMFLAG=1:IM(0)=IM2(0):IM(1)=IM2(1):IM(2)=IM2(2):IM(3)=IM2(3):IMX=37:IMY=20:IMR1=2:IMR2=2
2870 IF G-S<10000 AND IMPFIGH3=0 THEN IMPFIGH3=1:IMFLAG=2:IM(0)=IM3(0):IM(1)=IM3(1):IM(2)=IM3(2):IM(3)=IM3(3):IM(4)=IM3(4):IM(5)=IM3(5):IM(6)=IM3(6):IMX=35:IMY=19:IMR1=4:IMR2=3
2880 IF FLAG2<>BYPASS THEN FLAG2=FLAG2+1:GOTO 2910
2890 FLAG2=0
2900 E=E+INT(RND*5)-2:F=F+INT(RND*5)-2
2910 E=E-W:F=F-V
2920 IF E<2 THEN E=2+INT(RND*3)
2930 IF E>69 THEN E=69-INT(RND*3)
2940 IF F<2 THEN F=2+INT(RND*3)
2950 IF F>37 THEN F=37-INT(RND*3)
2960 PUT (E,F),IM
2970 IF IMNEW=0 THEN IMNEW=1:GOTO 3020
2980 IF IMFLAG=0 GOTO 3010
2990 IF IMFLAG=1 THEN IMFLAG=0:PUT (EP,FP),IM1:GOTO 3020
3000 IF IMFLAG=2 THEN IMFLAG=0:PUT (EP,FP),IM2:GOTO 3020
3930 IF J-S<20000 AND DVADER2=0 THEN DVADER2=1:DVFLAG=1:DV(0)=DV2(0):DV(1)=DV2(1):DV(2)=DV2(2):DV(3)=DV2(3):DVX=37:DVY=20:DVR1=2:DVR2=2
3940 IF J-S<10000 AND DVADER3=0 THEN DVADER3=1:DVFLAG=2:DV(0)=DV3(0):DV(1)=DV3(1):DV(2)=DV3(2):DV(3)=DV3(3):DV(4)=DV3(4):DV(5)=DV3(5):DV(6)=DV3(6):DVX=35:DVY=19:DVR1=4:DVR2=3
3950 IF FLAG2<>BYPASS THEN FLAG2=FLAG2+1:GOTO 3980
3960 FLAG2=0
3970 H=H+INT(RND*5)-2:I=I+INT(RND*5)-2
3980 H=H-W:I=I-V
3990 IF H<2 THEN H=2+INT(RND*3)
4000 IF H>69 THEN H=69-INT(RND*3)
4010 IF I<2 THEN I=2+INT(RND*3)
4020 IF I>37 THEN I=37-INT(RND*3)
4030 PUT (H,I),DV
4040 IF DVNEW=0 THEN DVNEW=1:GOTO 4090
4050 IF DVFLAG=0 GOTO 4080
4060 IF DVFLAG=1 THEN DVFLAG=0:PUT (HP,IP),DV1:GOTO 4090
4070 IF DVFLAG=2 THEN DVFLAG=0:PUT (HP,IP),DV2:GOTO 4090